package cn.cxyxj;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.*;

@FeignClient(value = "open-feign-provider-start")
public interface OpenFeignService {

    @RequestMapping("/open-feign-start")
    String openFeignStart();


    @PostMapping("/json-params")
    Params jsonParams(@RequestBody Params params);


    @GetMapping("/getUserInfo/{id}")
    String getUserInfo(@PathVariable("id") String userId);

    @GetMapping("/findByName")
    String findByName(@RequestHeader("name") String userName);

    @PostMapping("/form-params")
    Params formParams(@SpringQueryMap Params params);

    @PostMapping("/addUser")
    Params addUser(@RequestParam("id") String id, @RequestParam("name") String name);

}
